#
class Solution:
    def detectCycle(self , head ):
        # write code here
        if not head: return
        fast = head
        slow = head
        while fast and fast.next:
            fast = fast.next.next
            slow = slow.next
            if fast == slow:
                slowPro = head
                while slowPro != slow:
                    slow = slow.next
                    slowPro = slowPro.next
                return slowPro
        if not fast or not fast.next:
            return None